--- title: "L1-088 静静的推荐" created: 2025-11-28 tags: - 算法 --- # L1-088 静静的推荐 ## 题目 [L1-088 静静的推荐](https://pintia.cn/problem-sets/994805046380707840/exam/problems/type/7?problemSetProblemId=1518582000729911296&page=0) ![[image-67027a69.png]] ## 思路分析 ## 代码实现 ```cpp #include using namespace std; #define endl '\n' using ll = long long; using ull = unsigned long long; using PII = pair; using Pll = pair; int dx[4]= {-1,0,1,0},dy[4]= {0,1,0,-1}; const int inf = 0x3f3f3f3f; struct Student{ int s_tts; int s_pat; bool used; bool operator<(const Student& rhs) const { if(s_tts!=rhs.s_tts) return s_ttslast.s_tts || (cur.s_tts==last.s_tts && cur.s_pat>=s); } int main() { ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); int n,k,s; cin>>n>>k>>s; vector students; int cnt=0; while(n--){ int stts,spat;cin>>stts>>spat; if(stts>=175) students.push_back({stts,spat,false}); } sort(students.begin(),students.end()); int total=0; for(int batch=0;batch